<template>
  <div id="bobo">
    <el-col class="card" v-for="(o, index) in 10" :key="o" :offset="index > 0 ? 2 : 0">
      <el-card shadow="hover" :body-style="{ padding: '0px' }">
        <img src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" class="image" alt="">
        <div class="title">
          <span>好吃的汉堡</span>
          <div class="bottom clearfix">
            <time class="time">{{ currentDate }}</time><el-button type="text" class="button">操作按钮</el-button>
          </div>
        </div>
      </el-card>
    </el-col>
    <!-- https://juejin.cn/post/7156154491044102151 Infinite Scroll 无限滚动 -->
  </div>
</template>

<script>
export default {
  name: 'bobo',
  data() {
    return {
      currentDate: new Date()
    };
  }
}
</script>

<style lang="scss" scoped>
#bobo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.card {
  width: 300px;
  margin: 20px;
}

.title {
  max-height: 100px;
  line-height: 60px;
}

.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  display: block;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}
</style>
